/*
 * Project it.battlehorse.rcp.tools
 * Created on Nov 18, 2005
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * A copy of the LGPL is available also at
 * http://www.gnu.org/copyleft/lesser.html
 * 
 */ 
package it.battlehorse.rcp.tools.actors;


import it.battlehorse.rcp.tools.commons.actors.IValidationStatus;

import org.eclipse.ui.IViewPart;


/**
 * The main interface for defining Actors for the tools platform.
 * An <b>Actor</b> is a software component which can perform an action (or task), 
 * such as formatting an xml document, or compiling a piece of source code.  
 * 
 * @author battlehorse
 * @since Nov 18, 2005
 */
public interface IActor {
	
	/**
	 * Validates the actor parameters before running the Actor task.
	 * The task will be executed depending on the result validation status.   
	 *  
	 * @param view the view which is associated  with this actor (as defined in the
	 * 		actor plugin.xml file) 
	 * @return an object which describes the validation status of the current actor
	 * 		parameters.
	 */
	public IValidationStatus validate(IViewPart view);
	
	/**
	 * Returns an {@code IActorRunnable} instance which will be used to run the task
	 * associated with this actor.
	 * 
	 * @param view the view which is associated  with this actor (as defined in the
	 * 		actor plugin.xml file) 
	 * @return an {@code IActorRunnable} instance 
	 */
	public IActorRunnable getRunnable(IViewPart view);

}
